package com.applications.codemash.core.eventhandlers;

import com.applications.codemash.R;

import android.app.Activity;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.animation.AnimationUtils;
import android.widget.ViewFlipper;

public class NextButtonClickListener implements OnClickListener
{
	private ViewFlipper _flipper;
	private Activity _activity;
	
	public NextButtonClickListener(ViewFlipper flipper, Activity activity)
	{
		_flipper = flipper;
		_activity = activity;
	}
	
	@Override
	public void onClick(View v)
	{
		_flipper.setInAnimation(AnimationUtils.loadAnimation(_activity, R.anim.slide_left_in));
        _flipper.setOutAnimation(AnimationUtils.loadAnimation(_activity, R.anim.slide_left_out));
		_flipper.showNext();
	}

}
